# coding=utf-8
import time

from server import app
from client import Client

if __name__ == "__main__":
    from gevent import pywsgi

    client = Client()
    client.reg()
    server = pywsgi.WSGIServer(('0.0.0.0', 5001), app)
    server.serve_forever()

    while True:
        data = "guided armed 22.5285780000 114.0610870000 30 5 80"
        client.sendData(data)
        time.sleep(2)
